* {
    margin: 0;
    padding: 0;
}

.box {
    background-color: #000;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    // 定义透视效果，300是透视距离
    perspective: 300;
    -webkit-perspective: 300;
    div:nth-child(1) {
        animation: show12 1.2s linear forwards;
        animation-delay: 0.2s;
    }
    div:nth-child(2) {
        animation: show12 1.2s linear forwards;
        animation-delay: 0.4s;
    }
    @for $i from 3 to 6 {
        div:nth-child(#{$i}) {
            animation: show3 1s linear 1 forwards;
            animation-delay: $i * 0.2s + 0.1s;
        }
    }
    div:nth-child(6) {
        animation: show3 1.2s linear 1 forwards;
        animation-delay: 1.3s;
    }
    div:nth-child(7) {
        animation: show3 1.2s linear 1 forwards;
        animation-delay: 1.6s;
    }
}

.chars {
    color: #fff;
    /* 相对定位 */
    position: relative;
    width: 60px;
    height: 60px;
    text-align: center;
    line-height: 60px;
    font-size: 54px;
    font-weight: 900;
    /* 斜体 */
    font-style: italic;
    margin: 0 10px;
    opacity: 0;
}

.ll {
    position: absolute;
    margin-left: -480px;
    width: 60px;
    height: 60px;
    border-radius: 3px;
    opacity: 0;
}
.x {
    border: 4px solid #f5b5fc;
    animation: xmove 2s linear forwards;
}
.e {
    border: 4px solid #96f7d2;
    animation: emove 2s linear forwards;
    animation-delay: 0.1s;
}
.l {
    border: 4px solid #f0f696;
    animation: lmove 2s linear forwards;
    animation-delay: 0.2s;
}
.p {
    border: 4px solid #fcb1b1;
    animation: pmove 2s linear forwards;
    animation-delay: 0.3s;
}
.i {
    border: 4px solid #f0f696;
    animation: imove 2s linear forwards;
    animation-delay: 0.4s;
}
.n {
    border: 4px solid #96f7d2;
    animation: nmove 2s linear forwards;
    animation-delay: 0.5s;
}
.a {
    border: 4px solid #f5b5fc;
    animation: amove 2s linear forwards;
    animation-delay: 0.6s;
}
.pcov {
    position: absolute;
    width: 4px;
    height: 60px;
    background-color: #fcb1b1;
    opacity: 0;
    animation: showp forwards;
    animation-delay: 2.3s;
}

@keyframes showp {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
        transform: scale(1, 2);
    }
}

@keyframes amove {
    0% {
        opacity: 1;
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(180deg);
    }
    100% {
        opacity: 1;
        transform: rotateY(360deg);
    }
}
@keyframes nmove {
    30% {
        opacity: 1;
        transform: translate(30px) rotateY(135deg) scale(1.1, 1.1);
    }
    60% {
        transform: translate(50px) rotateY(45deg) scale(1.1, 1.1);
    }
    85% {
        transform: translate(80px) rotateY(103deg) scale(1.2, 1.2);
    }
    100% {
        opacity: 1;
        transform: translate(80px) rotateY(77deg) scale(1.2, 1.2);
    }
}

@keyframes imove {
    30% {
        opacity: 1;
        transform: translate(60px) rotateY(135deg) scale(1.2, 1.2);
    }
    60% {
        transform: translate(120px) rotateY(45deg) scale(1.3, 1.3);
    }
    85% {
        transform: translate(160px) rotateY(103deg) scale(1.3, 1.3);
    }
    100% {
        opacity: 1;
        transform: translate(164px) rotateY(77deg) scale(1.3, 1.3);
    }
}

@keyframes pmove {
    30% {
        opacity: 1;
        transform: translate(60px) rotateY(135deg) scale(1.2, 1.2);
    }
    60% {
        transform: translate(120px) rotateY(45deg) scale(1.4, 1.4);
    }
    85% {
        transform: translate(240px) rotateY(135deg) scale(1.6, 1.6);
    }
    100% {
        opacity: 1;
        transform: translate(240px) rotateY(90deg) scale(1.6, 1.6);
    }
}

@keyframes lmove {
    33% {
        opacity: 1;
        transform: translate(80px) rotateY(135deg) scale(1.2, 1.2);
    }
    66% {
        transform: translate(240px) rotateY(45deg) scale(1.6, 1.6);
    }
    95% {
        transform: translate(320px) rotateY(100deg) scale(1.4, 1.4);
    }
    100% {
        opacity: 1;
        transform: translate(320px) rotateY(103deg) scale(1.3, 1.3);
    }
}
@keyframes emove {
    33% {
        opacity: 1;
        transform: translate(80px) rotateY(135deg) scale(1.2, 1.2);
    }
    66% {
        transform: translate(240px) rotateY(45deg) scale(1.6, 1.6);
    }
    95% {
        transform: translate(390px) rotateY(135deg) scale(1.2, 1.2);
    }
    100% {
        opacity: 1;
        transform: translate(402px) rotateY(103deg) scale(1.2, 1.2);
    }
}
@keyframes xmove {
    25% {
        opacity: 1;
        transform: translate(80px) rotateY(135deg) scale(1.2, 1.2);
    }
    50% {
        transform: translate(260px) rotateY(45deg) scale(1.6, 1.6);
    }
    85% {
        transform: translate(400px) rotateY(135deg) scale(1.2, 1.2);
    }
    100% {
        opacity: 1;
        transform: translate(484px) rotateY(103deg) scale(1.1, 1.1);
    }
}

@keyframes show12 {
    0% {
        opacity: 1;
        transform: rotateY(0deg);
    }
    100% {
        opacity: 1;
        transform: rotateY(360deg);
    }
}
/* 第3个及之后的字符的动画 */
@keyframes show3 {
    0% {
        opacity: 1;
        transform: rotateY(90deg);
    }
    100% {
        opacity: 1;
        transform: rotateY(360deg);
    }
}
